package start.doubudouyin.service;

import start.doubudouyin.entity.DateNum;
import start.doubudouyin.entity.UserActiveNum;
import start.doubudouyin.entity.Usersinfo;
import com.baomidou.mybatisplus.extension.service.IService;
import start.doubudouyin.entity.UserGenderNum;

import java.util.Date;
import java.util.List;

/**
* @author 38798
* @description 针对表【usersinfo(用户信息表)】的数据库操作Service
* @createDate 2025-05-27 11:22:02
*/
public interface UsersinfoService extends IService<Usersinfo> {
    String isPhoneExist(String phone);
    String isIdcardExist(String idcard);
    String UserLogin(String phone,String password);
    Integer isUserOnline(String userId);
    Integer updatelastloginTime(Date lastloginTime, String userId);
    Integer updateonlineStatus(Integer onlineStatus,String userId);
    Integer UserRegister(Usersinfo usersinfo);

    //  获取用户信息
    Usersinfo getUserById(String userId);
    Integer UpdatePassword(String phone,String idcard,String password);
    Integer UpdatePasswordById(String userId,String newPassword);
    String VerifyUser(String phone,String idcard);
    String VerifyPassword(String userId,String password);
    String VerifyId(String userId,String idcard);
    List<Usersinfo> findAll();
    String VerifyPhone(String userId,String phone);
    Integer UpdatePhone(String userId,String phone);
    Integer EditPersonal(String nickname,String signature,String userId);
    Integer iconupload(String iconUrl,String userId);

    //获取30内每天注册的用户数量
    DateNum getUserRange30();

    //插入用户偏好
    Boolean insertUsersPrefer(String userId);

    //获取关注的用户信息
    List<Usersinfo> getFollowedInfo(String userId);

    //获取用户性别数量
    UserGenderNum getUserGenderNum();

    //获取用户活跃数量
    UserActiveNum getUserActiveNum();
}
